package pl.koziolekweb.budzet;

import org.apache.wicket.PageParameters;
import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.markup.html.form.PasswordTextField;
import org.apache.wicket.markup.html.form.TextField;
import org.apache.wicket.model.CompoundPropertyModel;

import pl.koziolekweb.budzet.model.LoginModel;

/**
 * Homepage
 */
public class HomePage extends WebPage {

	private static final long serialVersionUID = 1L;

	/**
	 * Constructor that is invoked when page is invoked without a session.
	 * 
	 * @param parameters
	 *            Page parameters
	 */
	public HomePage(final PageParameters parameters) {
		LoginModel loginModel = new LoginModel();
		CompoundPropertyModel model = new CompoundPropertyModel(loginModel);
		add(new Label("napis"));
		TextField userId = new TextField("uid");
		PasswordTextField userPass = new PasswordTextField("pass");
		Form form = new LoginForm("login", model);
		form.add(userId);
		form.add(userPass);
		add(form);
	}
}
